package tomcat;

/**
 * HTTP响应
 */
public class HttpResponse {
    private int code = 200;
    private String content;

    public HttpResponse(int code, String content) {
        this.code = code;
        this.content = content;
    }

    public HttpResponse(String content) {
        this.content = content;
    }

    public int length() {
        return content.length();
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
}
